function run_exp(num_state, num_mixture, type, mixflag, cross_val)

%type is used to extract the number of features
eflag=0;aflag=0;dflag=0;
num_feature = 12;
for i = 1:length(type)
    if type(i) == 'E'
        eflag = 1;
    elseif type(i) == 'A'
        aflag = 1;
    elseif type(i) == 'D'
        dflag = 1;
    end
end
if eflag == 1
    num_feature = num_feature + 1;
end
if aflag == 1
    num_feature = num_feature * 3;
end
if dflag == 1 & aflag ~=1
    num_feature = num_feature * 2;
end

if mixflag==1
    batch_GMM_multi(num_state, num_feature, type, num_mixture,'Result_allcalltype', cross_val)
else
    batch_noGMM(num_state, num_feature, type,'Result_allcalltype', cross_val)
end